/*
    教职工管理
 */

import request from '@/router/axios'

//列表的人员展示和查找
export function personList(obj) {
    return request({
        url: '/campus/persons/page',
        method: 'get',
        params: obj
    })
}

//上传人员照片
export function addPersonPhoto(obj) {
    return request({
        url: '/campus/persons/photo',
        method: 'post',
        data: obj
    })
}

//根据id查看人员照片
export function showPersonPhoto(id) {
    return request({
        url: '/campus/persons/photo/' + id,
        method: 'get',
        params: id
    })
}

//人员增加
export function addPerson(obj) {
    return request({
        url: '/campus/persons',
        method: 'post',
        data: obj
    })
}

//根据id查询人员
export function searchPerson(id) {
    return request({
        url: '/campus/persons/' + id,
        method: 'get',
        params: id
    })
}
//人员编辑
export function editPerson(obj) {
    return request({
        url: '/campus/persons',
        method: 'put',
        data: obj
    })
}

//人员删除
export function delStudent(id) {
    return request({
        url: '/campus/student/' + id,
        method: 'delete',
    })
}

//批量删除
export function delIdsObj(ids) {
    return request({
        url: '/campus/student/deleteBatch/' + ids,
        method: 'delete',

    })
}

//报表导出
export function exportPerson(obj, headers) {
    return request({
        url: '/campus/persons/excel_export',
        method: 'get',
        params: {obj, headers}
    })
}

